{% extends 'base.html'%}

{% block content %}


<head>
<script type="text/javascript" src="/my-media/js/jquery.quicksearch.js"></script>
<script type="text/javascript">
		$(document).ready(function () {
			$('table#table_example tbody tr').quicksearch({
				position: 'before',
				attached: 'table#table_example',
				stripeRowClass: ['odd', 'even'],
				labelText: 'Search the stock'
			});

		});
	</script>

</head>
<p>Welcome to view Stock </p>
{% if user.is_authenticated %}

Hello  user: {{user}}

{%endif%}

    <table id="table_example" border="0">
<thead>
    <tr><th>StockName</th><th>StockCompanyName</th></tr>
</thead>
<tbody>
{% for stock in stocks %}

        <tr><form action="/users/news/" id="form" method=POST>
        <td>{{ stock.stock_name }}</td>
        <td>{{ stock.stock_companyname }}</td>
        <!-- <td><input type=submit id = stock.id value="Submit"></form></td> -->
        <td><a href="/users/newscontent/{{ stock.stock_name }}">read news</a></td>
        <td>&nbsp;&nbsp;&nbsp;&nbsp;<a href="/recommendation/fluctuation/{{ stock.stock_name }}">fluctuation</a>
       
         </tr>
{% endfor %} 
</tbody>
    </table>




<div style="clear: both; display: block; padding: 90px 0; text-align:center;">
</div>
{%endblock%}